package cn.itcast.n4;

/**
 * className: Test
 * description:
 * date: 2023/3/8 0008-15:01
 * <p>
 * project: concurrent
 * package: cn.itcast.n4
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
public class Test {
    public static void main(String[] args) throws InterruptedException {
        new Thread(() -> {
            synchronized (Test.class) {
                try {
                    Thread.sleep(10000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }, "t1").start();

        Thread.sleep(100);
        new Thread(() -> {
            synchronized (Test.class) {

            }
        }, "t2").start();

        new Thread(() -> {
            synchronized (Test.class) {

            }
        }, "t3").start();
    }
}
